Skip to main content
Version: 5.0

TimePunch Customer Service

This service provides an interface for accessing the customer data that are stored in TimePunch.

CreateCustomer

This method creates a new customer object and returns it. The customer data won’t be stored in the database.

CustomerDto CreateCustomer(  
out TpFault fault,
TpAuthentication authentication);
Needed Permissioncustomers@manage
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
Return valueNew CustomerDTO object with the preset of customer data.

SaveCustomers

This method saves the customer to the database and returns the stored data as a result again.

CustomerDto[] SaveCustomers(  
out TpFault fault,
TpAuthentication authentication,
CustomerDto[] customers);
Needed Permissioncustomers@import
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
customersArray of customer data to store in the database
Return valueThe customer data that has been stored in the database.

ImportCustomers

This method imports the given customer data in the database. The difference to the save method is that the customer data is identified with the customers Ref Nr and the Name, instead of the Id.

CustomerDto[] ImportCustomers(  
out TpFault fault,
TpAuthentication authentication,
CustomerDto[] customers);
Needed Permissioncustomers@import
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
customersArray of customer data to import in the database
Return valueThe customer data that has been stored in the database.

LoadCustomers

This method loads the customer data with the passed customer ids. The method should be preferred to the search, if the IDs of the customer data are known.

CustomerDto[] LoadCustomers(  
out TpFault fault,
TpAuthentication authentication,
Guid[] customerIds);
Needed Permissioncustomers@access
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
customerIdsArray of customer ids to load from the database
Return valueThe customer data that has been loaded from the database.

MarkCustomersAsDeleted

This method marks the customer data as deleted. But the data won't be physically deleted.

void MarkCustomersAsDeleted(  
out TpFault fault,
TpAuthentication authentication,
Guid[] customerIds);
Needed Permissioncustomers@manage
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
customerIdsArray of customer ids to mark as deleted in database

DeleteCustomers

This method attempts to physically delete the customer's data in the database. If the customer is already in use, the physical deletion is no longer possible. In this case, the customer should only be marked as deleted.

void DeleteCustomers(  
out TpFault fault,
TpAuthentication authentication,
Guid[] customerIds);
Needed Permissioncustomers@manage
NameModifierDescription
FaultOutContains the error if an exception occurs.
AuthenticationUser authentication
customerIdsArray of customer ids to physically delete in database

SearchCustomers

This method searches for all customers on the basis of the specified search object.

CustomerDto[] SearchCustomers(  
out TpFault fault,
TpAuthentication authentication,
CustomerSearchDto templateCustomer);
Needed Permissioncustomers@access
NameModifierDescription
FaultOutContains the error if an exception occurs.
AuthenticationUser authentication
templateCustomerSearch object that holds the properties used for searching the real customers
Return valueFound customer data

SearchActiveCustomers

This method searches for all active customers on the basis of the specified search object.

CustomerDto[] SearchCustomers(  
out TpFault fault,
TpAuthentication authentication,
CustomerSearchDto templateCustomer);
Needed Permissioncustomers@access
NameModifierDescription
FaultOutContains the error if an exception occurs.
AuthenticationUser authentication
templateCustomerSearch object that holds the properties used for searching the real customers
Return valueFound customer data